#include <iostream>
using namespace std;

#include <sys/types.h>
#include <signal.h>


int main(int argc, char* argv[]){
    //这个进程的用法是 ./mykill 信号值 pid

    if(argc != 3){
        cout << "please use the format of <./mykill.exe sig pid>" << endl;
    }

    else{
        int sig = stoi(argv[1]);//信号值
        pid_t snd_pid = stoi(argv[2]);//pid_t其实就是整数 所以直接把字符串转整形即可
        kill(snd_pid, sig);
    }
   
    return 0;
}